package com.author.surface;

import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;

import javax.swing.SwingUtilities;

public final class Main {
	/** SystemProperty is used for getting all properties of the user system */
	public static SystemProperty	systemProperty;

	/** APplication surface */
	protected static Surface	applicationSurface;

	/** Start Author WYSIWYG document editor */
	private static void createAndShowGUI() {
		try {
			Main.applicationSurface = Surface.createApplicationSurface();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		/* Get all system properties */
		systemProperty = new SystemProperty();

		/* Start application initialization inside the Event Queue */
		try {
			SwingUtilities.invokeAndWait((new Runnable() {
				public void run() {
					createAndShowGUI();
				}
			}));
		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			e.printStackTrace();
		}
	}
}
